#include "hw_beep.h"

bool BEEP_FLAG = false;

static uint16_t count = 0;

void Beep_start(void)
{
	BEEP_FLAG = true;
}

void Beep_stop(void)
{
	BEEP_FLAG = false;
}

void SysTick_Handler(void)
{

	if(BEEP_FLAG)
	{
		DL_TimerG_startCounter(PWM_BEEP_INST);
		count++;
	}
	if(count == BEEP_TIME) 
	{
		BEEP_FLAG = false;
		DL_TimerG_stopCounter(PWM_BEEP_INST);
		count = 0;
	}
	
}